window.onload = function () {
    var app = new Vue({
        el: "#app",
        data: {
            name: "",
            number: "",
            residence: false,
            list: []
        },
        methods: {
            add: function () {
                this.list.push({
                    name: this.name,
                    number: this.number,
                    residence: this.residence
                })
                this.reset();
            },
            reset: function () {
                this.name = "";
                this.number = "";
                this.residence = false;
                i
            },
            del: function (i) {
                this.list.splice(i, 1);
            },
            dele: function () {
                this.list = [];
            }
        },
        filters: {
            stateFilter: function (type) {
                switch (type) {
                    case true:
                        return '已做';
                    case false:
                        return '没做';
                        dafault:
                        return type;
                }
            }
        }
    })
}